<!--#INCLUDE FILE="conn.asp"-->
<!-- #include file="aFunction_charCode.asp" -->
<!-- #include file="ad_comSub.asp" -->

<%
Call tslt_useridentity12_error_end()

dim rs
dim sql
sql="select * from MYScoreRoom"
set rs=conn.execute(sql)
      MainScore2=rs("MainScore")
      DelMainScore2=rs("DelMainScore")
      ReplyScore2=rs("ReplyScore")
      DelReplyScore2=rs("DelReplyScore")
      JinghuaScore2=rs("JinghuaScore")
      TopScore2=rs("TopScore")
      LockarticleScore2=rs("LockarticleScore")
      DefaultMinSize2=rs("DefaultMinSize")
      MaxSize2=rs("MaxSize")
      AddSize2=rs("AddSize")
      NoteByte2=rs("NoteByte")
rs.close
set rs=nothing
%>
<html>
<head>

<title></title>
<link href=../style/<%=session("tslt_stylefolder")%>/admin.css rel="stylesheet" type="text/css">
<SCRIPT Language=JavaScript>
     function check(theform) {
          if (theform.MainScore.value=="" || theform.DelMainScore.value=="" || theform.ReplyScore.value=="" || theform.DelReplyScore.value==""){
               alert("Բ𣬳رû⣬ıΪգ");
               return false;
          }
          if (theform.JinghuaScore.value=="" || theform.LockarticleScore.value=="" || theform.TopScore.value=="" || theform.DefaultMinSize.value==""){
               alert("Բ𣬳رû⣬ıΪգ");
               return false;
          }
          if (theform.MaxSize.value=="" || theform.AddSize.value=="" || theform.NoteByte.value==""){
               alert("Բ𣬳رû⣬ıΪգ");
               return false;
          }

          if ( isNaN(theform.MainScore.value && theform.DelMainScore.value && theform.ReplyScore.value && theform.DelReplyScore.value)){
               alert("Բ𣬳رû⣬ı֣");
               return false;
          }
          if ( isNaN(theform.JinghuaScore.value && theform.LockarticleScore.value && theform.TopScore.value && theform.DefaultMinSize.value)){
               alert("Բ𣬳رû⣬ı֣");
               return false;
          }
          if ( isNaN(theform.MaxSize.value && theform.AddSize.value && theform.NoteByte.value)){
               alert("Բ𣬳رû⣬ı֣");
               return false;
          }

          if (theform.AdhocName.value!=""){
               if (theform.AdhocSize.value==""){
                     alert("رûġرռ䡱Ϊգ");
                     theform.AdhocSize.focus();
                     return false;
               }
               if (isNaN(theform.AdhocSize.value)){
                     alert("رûġرռ䡱֣");
                     theform.AdhocSize.value="";
                     theform.AdhocSize.focus();
                     return false;
               }
          }
          else{
                  if(theform.AdhocSize.value!=""){
                       alert("رûġûΪգ");
                       theform.AdhocSize.value="";
                       return false;
                  }
          }
     }

function loadThreadFollow2(ino){
     var targetDiv =eval("follow" + ino);
     if (targetDiv.style.display!='block'){
             targetDiv.style.display="block";
     }
     else{
            targetDiv.style.display="none";
     }
}
</SCRIPT>
</head>
<body bgcolor=#aaaac4>
<br>
<CENTER>
<table><tr><td class="font2">ֶſռ趨</td></tr></table>
</CENTER>
<br>

<%
if Request.Form("ScoreR") = "ok" then
       call MyScoreRoom()
end if
if Request.Form("isDefaultSetup") = "ok" then
       call SRDefaultSetup()
end if
%>

<table border=1 bgcolor=#FFFFFF width=85% align="center" cellpadding="5" cellspacing="0" bordercolordark="#CCCCCC" bordercolorlight="#000000">
       <form method="post" action="ScoreRoom.asp" name=form1>
       <input type="hidden" name="ScoreR" value="ok">
              <tr align="center" bgcolor=#89ED89>
                    <td><b>ֺվڶſռ趨</b></td>
              <tr align="center" bgcolor=#DDFFDD>
                    <td></td>
              <tr align="center">
                    <td>
                            <table align="center" border=0 width=95% cellspacing="2" cellpadding="2">
                                       <tr bgcolor=#DDFFDD>
                                            <td rowspan=6 width=1%>ֹ
                                       </tr>
                                       <tr bgcolor=#DDFFDD>
                                            <td width=30%>
                                            <td>֣
                                            <td width=30%>
                                            <td>֣
                                       </tr>
                                       <tr bgcolor=#DDFFDD>
                                            <td>ӣ
                                            <td>+<input class="text1" type=text size=4 name=MainScore value=<%=MainScore2%>>
                                            <td>ӱɾ
                                            <td>-<input class="text1" type=text size=4 name=DelMainScore value=<%=DelMainScore2%>>
                                       </tr>
                                       <tr bgcolor=#DDFFDD>
                                            <td>ظӣ
                                            <td>+<input class="text1" type=text size=4 name=ReplyScore value=<%=ReplyScore2%>>
                                            <td>ظӱɾ
                                            <td>-<input class="text1" type=text size=4 name=DelReplyScore value=<%=DelReplyScore2%>>
                                       </tr>
                                       <tr bgcolor=#DDFFDD>
                                            <td>Ϊ
                                            <td>+<input class="text1" type=text size=4 name=JinghuaScore value=<%=JinghuaScore2%>>
                                            <td>ӱΣ
                                            <td>-<input class="text1" type=text size=4 name=LockarticleScore value=<%=LockarticleScore2%>>
                                       </tr>
                                       <tr>
                                            <td bgcolor=#DDFFDD>ӹ̶
                                            <td bgcolor=#DDFFDD>+<input class="text1" type=text size=4 name=TopScore value=<%=TopScore2%>>
                                            <td colspan=2>
                                                    <table align="center" border=0>
                                                               <tr>
                                                                         <td><span style="font-size:10pt">(ע:)ɾӻظʱûֲ</span>
                                                               </tr>
                                                     </table>
                                       </tr>
                            </table>
                    </td>
              </tr>
              <tr align="center">
                    <td>
                            <table align="center" border=0 width=95% cellspacing="2" cellpadding="2">
                                       <tr bgcolor=#DDFFDD>
                                            <td rowspan=5 width=1%>ſռ
                                       </tr>
                                       <tr bgcolor=#DDFFDD>
                                            <td width=50%>ĬСվڶſռ䣺
                                            <td><input type=text size=4 name=DefaultMinSize value=<%=DefaultMinSize2%>>k
                                       </tr>
                                       <tr bgcolor=#DDFFDD>
                                            <td>Ĭվڶſռ䣺
                                            <td ><input type=text size=4 name=MaxSize value=<%=MaxSize2%>>k
                                       </tr>
                                       <tr bgcolor=#DDFFDD>
                                            <td>ÿ100վڶſռӣ
                                            <td><input type=text size=4 name=AddSize value=<%=AddSize2%>>k
                                       </tr>
                                       <tr bgcolor=#DDFFDD>
                                            <td>ÿƪվڶֽ
                                            <td><input type=text size=4 name=NoteByte value=<%=NoteByte2%>>Byte
                                       </tr>
                            </table>
                    </td>
              </tr>
              <tr align="center">
                    <td>
                            <table align="center" border=0 width=95% cellspacing="2" cellpadding="2">
                                       <tr bgcolor=#DDFFDD>
                                            <td width=50%>رûû<input type=text size=9 name=AdhocName></td>
                                            <td>رռ䣺<input type=text size=4 name=AdhocSize>k</td>
                                       </tr>
                                       <tr bgcolor=#DDFFDD id="followImg2" style="cursor:hand;text-decoration:underline" onclick="loadThreadFollow2(2)">
                                            <td colspan=2>رû</td>
                                       </tr>
                                       <tr bgcolor=#DDFFDD id="follow2" style="cursor:hand;DISPLAY: none" onclick="loadThreadFollow2(2)">
                                            <td colspan=2>
                                                    <table align="center" border=0 width=100% cellspacing="2" cellpadding="2">
                                                                <%call AdhocUserList()%>
                                                    </table>
                                            </td>
                                       </tr>
                            </table>
                    </td>
              </tr>
              <tr>
                    <td align="right">
                            <table align="center" border=0>
                                       <tr>
                                            <td>
                                                     <input type="submit" value="      " name="S1" onclick="return check(this.form);">
                                                     </form>
                                            </td>
                                            <td>                                                    
                                                    <form method="post" action="ScoreRoom.asp" name=form1>
                                                    &nbsp;
                                                    <input type="hidden" name="isDefaultSetup" value="ok">
                                                    <input type="submit" value="ָĬ">
                                                    </form>
                                            </td>
                                       </tr>
                            </table>
                    </td>
              </tr>
</table>
</CENTER>
</body>
</html>

<%
Call conn_Nothing()

sub MyScoreRoom()
         dim MainScore,DelMainScore,RelplyScore,DelReplyScore,JinghuaScore,LockarticleScore,TopScore
         dim DefaultMinSize,MaxSize,AddSize,NoteByte
         MainScore=request.form("MainScore")
         DelMainScore=request.form("DelMainScore")
         ReplyScore=request.form("ReplyScore")
         DelReplyScore=request.form("DelReplyScore")
         JinghuaScore=request.form("JinghuaScore")
         LockarticleScore=request.form("LockarticleScore")
         TopScore=request.form("TopScore")
         DefaultMinSize=request.form("DefaultMinSize")
         MaxSize=request.form("MaxSize")
         AddSize=request.form("AddSize")
         NoteByte=request.form("NoteByte")
         if DefaultMinSize<0 then DefaultMinSize=0
         if MaxSize<0 then MaxSize=0
         if AddSize<0 then AddSize=0
         if NoteByte<0 then NoteByte=0
        dim AdhocName,AdhocSize
        AdhocName=request.form("AdhocName")
        AdhocSize=request.form("AdhocSize")
        if AdhocSize<>"" then
               if AdhocSize<0 then AdhocSize=0
        end if
        conn.execute("update MYScoreRoom set MainScore='"&MainScore&"',DelMainScore='"&DelMainScore&"',ReplyScore='"&ReplyScore&"',DelReplyScore='"&DelReplyScore&"',JinghuaScore='"&JinghuaScore&"',LockarticleScore='"&LockarticleScore&"',TopScore='"&TopScore&"',DefaultMinSize='"&DefaultMinSize&"',MaxSize='"&MaxSize&"',AddSize='"&AddSize&"',NoteByte='"&NoteByte&"'")
        if AdhocName<>"" and AdhocSize<>"" then
               dim AdhocNameSql,rs
               AdhocNameSql="select * from ts_userinfo where username='"&AdhocName&"'"
               set rs=server.createobject("adodb.recordset")
               rs.open AdhocNameSql,conn,1,3
                      if rs.bof or rs.eof then
                             Response.write"<SCRIPT language=Javascript>passwords(promptInfo_ScoreRoom(0))</SCRIPT>"
                             Response.end
                      else
                             loginuserSql = "update ts_userinfo set AdhocRoomSize='" &AdhocSize&"' where username = '"&AdhocName&"'"
                             conn.Execute (loginuserSql)
                             Response.Write "<SCRIPT language=Javascript>passwords(promptInfo_ScoreRoom(1))</SCRIPT>" &AdhocName& "<SCRIPT language=Javascript>passwords(promptInfo_ScoreRoom(2))</SCRIPT>" &AdhocSize& "<SCRIPT language=Javascript>passwords(promptInfo_ScoreRoom(3))</SCRIPT>"
                      end if
               rs.close
               set rs=nothing
        end if
       Call infoDivShow("  óɹ  ")
       Response.write"<META HTTP-EQUIV='Refresh' content='4; URL=ScoreRoom.asp'>"
end sub

sub AdhocUserList()
       dim RS,AdhocUsql
       set RS = Server.CreateObject("ADODB.Recordset")
       AdhocUsql="select * from ts_userinfo where AdhocRoomSize<>0 order by id desc"
       rs.open AdhocUsql,conn
            if RS.EOF or RS.bof then
                   Response.write"<tr bgcolor=#FEC9F9><td>"
            else
                   Response.write "<SCRIPT language=Javascript>passwords(promptInfo_ScoreRoom(5))</SCRIPT>"
                   do while not rs.eof
                         Response.write "<tr bgcolor=#FEC9F9><td align=center>" &rs("username")& "<td align=center><font color=red>" &rs("AdhocRoomSize")& "</font>K"
                         rs.movenext
                   loop 
            end if
       RS.close 
       set RS=nothing 
end sub

sub SRDefaultSetup()
         dim MainScore,DelMainScore,RelplyScore,DelReplyScore,JinghuaScore,LockarticleScore,TopScore
         dim DefaultMinSize,MaxSize,AddSize,NoteByte
         MainScore=2
         DelMainScore=-2
         ReplyScore=1
         DelReplyScore=-1
         JinghuaScore=10
         LockarticleScore=-1
         TopScore=10
         DefaultMinSize=1
         MaxSize=100
         AddSize=1
         NoteByte=1000
        conn.execute("update MYScoreRoom set MainScore='"&MainScore&"',DelMainScore='"&DelMainScore&"',ReplyScore='"&ReplyScore&"',DelReplyScore='"&DelReplyScore&"',JinghuaScore='"&JinghuaScore&"',LockarticleScore='"&LockarticleScore&"',TopScore='"&TopScore&"',DefaultMinSize='"&DefaultMinSize&"',MaxSize='"&MaxSize&"',AddSize='"&AddSize&"',NoteByte='"&NoteByte&"'")
       Call infoDivShow("  ָĬóɹ  ")
       Response.write"<META HTTP-EQUIV='Refresh' content='4; URL=ScoreRoom.asp'>"
end sub
%>